using System;
using CardPlay.Model.GameModel;

namespace CardPlay.Tests.DemoPack
{
    internal sealed class MockRandomNumberSequence : IRandomNumberSequence
    {
        private Random _series = new Random();
        private int _seed;

        public int Seed
        {
            get { return _seed; }
            set
            {
                _seed = value;
                Reset();
            }
        }

        public int Next(int maxValue)
        {
            return _series.Next(maxValue);
        }

        public void Reset()
        {
            _series = new Random(Seed);
        }
    }
}